<template>
  <div class="goback" :style="{borderColor : changeColor}">
    <!-- <van-nav-bar :title="title" :style="{color : changeColor}" left-arrow @click-left="onClickLeft" /> -->
    <div class="box">
      <van-icon :style="{color : changeColor}" name="arrow-left" @click="onClickLeft" />
      <p :style="{color : changeColor}">{{title}}</p>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    title: {
      type: String,
      default: "标题"
    },
    changeColor: {
      type: String,
      default: "#b19f7b"
    }
  },
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    }
  }
};
</script>

<style lang="less" scoped>
* {
  margin: 0;
  padding: 0;
}
.goback {
  background: #fff;
  .box {
    display: flex;
    align-items: center;
    .van-icon {
      font-size: 20px;
      padding: 13px 10px;
    }
    p {
      flex: 1;
      text-align: center;
      margin-left: -40px;
      font-size: 16px;
      font-weight: 700;
    }
  }
}
</style>